asp中"语句未结束"问题,请高手帮忙

来源:百度知道 编辑:UC知道 时间:2024/09/25 06:27:51
这是一段代码,请高手帮看一下应该怎么写

<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from one order by ID",conn,3,2

rs.pagesize=10
icount=rs.recordcount
ipagesize=rs.pagesize
maxpage=rs.pagecount
page=request("page")
perpage=rs.pagesize

if not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if

if page<=1 then
page=1
elseif page>maxpage then
page=maxpage
end if

rs.AbsolutePage=page

if page=maxpage then
x=icount-(maxpage-1)*ipagesize
else
x=ipagesize
end if
%>
<%
For a=1 To x
%>
<table width="500" align="center">
<tr>
<%
if not rs.eof then
i=1
do while not rs.eof
%>
<td>
<table width="100">
<tr>
<td al

for a=1 to x……
next

你写成了
for a=1 to x……
next a

语法有问题
还有.你中间有一些
"
<td align="center"><a href="listall.asp?id=<%=rs("ID")%>" target="_blank"><%=trim(rs("ID"))%

></a></td>
"
像这种.不知是你拷代码的原因看起来像不连了还是本来就换行了.如果本来就换行那也是错的.